package com.jiyun.controller;

import com.jiyun.feign.FeignQuiz;
import com.jiyun.vo.QuizDto;
import com.jiyun.vo.ResultResopnse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/* *
 * @Author nxj
 * @Date 2023 09 2023/9/1 15 26
 * */
@RequestMapping("quiz")
@RestController
public class QuizController {

    @Autowired
    private FeignQuiz feignQuiz;

    @PostMapping("findQuiz")
    public ResultResopnse findQuiz(@RequestBody QuizDto quizDto){
        return feignQuiz.findQuiz(quizDto);
    }
    @GetMapping("findQuizPaperTi")
    public ResultResopnse findQuizPaperTi(@RequestParam("id")Integer id){
        return feignQuiz.findQuizPaperTi(id);
    }
    @GetMapping("AddPaperConsumer")
    public ResultResopnse AddPaperConsumer(@RequestParam("id")Integer id){
        return feignQuiz.AddPaperConsumer(id);
    }
    @GetMapping("DeletePaperConsumer")
    public ResultResopnse DeletePaperConsumer(@RequestParam("id")Integer id){
        return feignQuiz.DeletePaperConsumer(id);
    }
    @GetMapping("addDaan")
    public ResultResopnse addDaan(@RequestParam("id")Integer id,@RequestParam("paperId")Integer paperId,@RequestParam("daan")String daan){
        return feignQuiz.addDaan(id,paperId,daan);
    }

    @GetMapping("addKao")
    public ResultResopnse addKao(@RequestParam("id")Integer id,@RequestParam("paperId")Integer paperId,@RequestParam("kao")String kao){
        return feignQuiz.addKao(id,paperId,kao);
    }
}
